package com.ssy.lingxi.member.merchant.model.vo.validate.request;

import com.ssy.lingxi.member.merchant.api.handler.annotation.PhoneAnno;
import com.ssy.lingxi.member.merchant.model.vo.basic.request.AreaCodeVO;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 会员能力 - 新增会员接口参数VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-08-18
 */
@Data
public class MemberAbilityAddMemberVO implements Serializable {
    private static final long serialVersionUID = -7117536522555225885L;

    /**
     * 会员类型枚举值
     */
    @NotNull(message = "会员类型Id不能为空")
    @Positive(message = "会员类型Id要大于0")
    private Long memberTypeId;

    /**
     * 角色Id
     */
    @NotNull(message = "角色Id不能为空")
    @Positive(message = "角色Id要大于0")
    private Long roleId;

    /**
     * 所属会员Id
     */
    private Long memberId;

    /**
     * 会员等级
     */
    private Integer level;

    /**
     * 国家代码Id
     */
    @NotNull(message = "国家代码Id不能为空")
    @Positive(message = "国家代码Id要大于0")
    private Long countryCodeId;

    /**
     * 手机号码
     */
    @NotNull(message = "手机号码不能为空")
    @PhoneAnno
    private String phone;

    /**
     * 注册邮箱
     */
    @Email(message = "邮箱格式不正确")
    private String email;

    /**
     * 渠道类型Id，如果会员类型为渠道会员、渠道个人会员，必填
     */
    private Long channelTypeId;

    /**
     * 城市编码列表，如果会员类型为渠道会员、渠道个人会员，必填
     */
    @Valid
    private List<AreaCodeVO> areas;

    /**
     * 上级会员关系Id
     */
    private Long upperRelationId;

    /**
     * 渠道描述
     */
    private String remark;

    /**
     * 会员注册资料，Map对象类型
     * Key为获取页面内容接口返回的fieldName，value为用户填写的内容
     */
    private Map<String, Object> detail;

    public Long getMemberTypeId() {
        return memberTypeId;
    }

    public void setMemberTypeId(Long memberTypeId) {
        this.memberTypeId = memberTypeId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Long getCountryCodeId() {
        return countryCodeId;
    }

    public void setCountryCodeId(Long countryCodeId) {
        this.countryCodeId = countryCodeId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Long getChannelTypeId() {
        return channelTypeId;
    }

    public void setChannelTypeId(Long channelTypeId) {
        this.channelTypeId = channelTypeId;
    }

    public List<AreaCodeVO> getAreas() {
        return areas;
    }

    public void setAreas(List<AreaCodeVO> areas) {
        this.areas = areas;
    }

    public Long getUpperRelationId() {
        return upperRelationId;
    }

    public void setUpperRelationId(Long upperRelationId) {
        this.upperRelationId = upperRelationId;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Map<String, Object> getDetail() {
        return detail;
    }

    public void setDetail(Map<String, Object> detail) {
        this.detail = detail;
    }
}
